// pages/index/HomeNav/PsychologicalAQ/answerContent/answerContent.js
Page({

  /**
   * 页面的初始数据
   */
  data: {
    reply:"",
    title:"",
    questionid:"",
    question:''
  },
  
  onLoad(options){
    let questionid=options.id
    let that=this
    that.setData({
      title:options.title,
      questionid:options.id
    })
    wx.request({
      method:"GET",
      url: 'http://localhost:8080/reply/findByPage',
      data:{
        pageNum:1,
        pageSize:100,
        questionId:questionid
      },
      success(resp){
        that.setData({
          reply:[...that.data.reply,...resp.data.data.list]
        })
      }
    })
    wx.request({
      method:"GET",
      url: 'http://localhost:8080/question/findById',
      data:{
        questionId:questionid
      },
      success(resp){
        that.setData({
          question:resp.data.data
        })
      }
    })
  }
})